﻿using PlaceOrder_Core.Services.Interfaces;
using PlaceOrder_Shared.Models.HengSheng;
using PlaceOrder_Shared.Models.Trade;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlaceOrder_Core.Helper
{
    public class DBFHelper
    {
        private readonly IDailyData _dailyData;

        private List<TSInfoRow> TsInfos = null; //恒生相关？？
        private List<HengShengMarketInfo> Markets = null;
        public DBFHelper(IDailyData dailyData)
        {
            _dailyData = dailyData;
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            Encoding encoding = Encoding.GetEncoding("GBK");
            InitValue();
        }

        /// <summary>
        /// 初始化
        /// </summary>
        /// <exception cref="NotImplementedException"></exception>
        private void InitValue()
        {
            TsInfos = _dailyData.GetTSInfoForHengSheng();
            Markets = _dailyData.GetHengShengMarketInfo();
        }
    }
}
